<template>
	<view class="main">
		<view class="xc" style="background-color: #FFF;margin-bottom: 10px;">
<!-- 			<view class="title-xc" style="padding: 10px;font-size: 16px;font-weight: 800;">
				巡查日志详情
			</view>
			<div><u-line></u-line></div> -->
			<view class="content-xc" style="padding: 10px 10px 0px 10px;">
				<view class="c-xc-c" style="display: flex;align-items: flex-start;justify-content: space-between;margin-bottom: 10px;">
					<view class="cleft">
						项目名称
					</view>
					<view class="cright">
						{{data.xmmc}}
					</view>
				</view>
			</view>
      <view class="content-xc" style="padding: 10px 10px 0px 10px;">
      	<view class="c-xc-c" style="display: flex;align-items: flex-start;justify-content: space-between;margin-bottom: 10px;">
      		<view class="cleft">
      			巡查人员
      		</view>
      		<view class="cright">
      			{{data.xcry}}
      		</view>
      	</view>
      </view>
      <view class="content-xc" style="padding: 10px 10px 0px 10px;">
      	<view class="c-xc-c" style="display: flex;align-items: flex-start;justify-content: space-between;margin-bottom: 10px;">
      		<view class="cleft">
      			巡查地点
      		</view>
      		<view class="cright">
      			{{data.xcdd}}
      		</view>
      	</view>
      </view>
      <view class="content-xc" style="padding: 10px 10px 0px 10px;">
      	<view class="c-xc-c" style="display: flex;align-items: flex-start;justify-content: space-between;margin-bottom: 10px;">
      		<view class="cleft">
      			存在问题/现场施工情况
      		</view>
      		<view class="cright">
      			{{data.details && data.details.map(item=>item.content).join(';')}}
      		</view>
      	</view>
      </view>
      <view class="content-xc" style="padding: 10px 10px 0px 10px;">
      	<view class="c-xc-c" style="display: flex;align-items: flex-start;justify-content: space-between;margin-bottom: 10px;">
      		<view class="cleft">
      			是否整改完成
      		</view>
      		<view class="cright">
      			{{data.sfzgwc == 0 ? '否':'是'}}
      		</view>
      	</view>
      </view>
			<view class="cleft" style="padding: 0px 10px 10px 10px;">
				现场图片
			</view>
			<view class="images" v-for="(item,index) in data.zpList" :key="index" style="padding: 0px 10px 10px 10px;">
				<img :src="item.url" style="width: 100%;"/>
			</view>
		</view>
		</view>
	</view>
</template>

<script>
	import { findPro,getDateDic,getPatrolDetail } from '@/common/api.js'
  
	export default{
		onLoad: function(option){
			this.id = option.id
			
			// uni.setNavigationBarTitle({
			//     title: option.title
			// });
		},
		async onShow() {
			let that = this
      await that.getPatrolDetail()
			// await that.getDic()
			// await that.getDetail(that.id)
		},
		data(){
			return{
				/* 字典 */
				dic:{
					status:'Enabled',
					type:'PROJECT_ZGZT'
				},
				dicList:[],
				data:'',
				list:[
					{name:'意见单编号',code:'yjbh',value:''},
					{name:'项目名称',code:'xmmc',value:''},
					{name:'整改状态',code:'zgztn',value:''},
					{name:'建设单位',code:'jsdw',value:''},
					{name:'监理单位',code:'jldw',value:''},
					{name:'施工单位',code:'sgdw',value:''},
					{name:'设计单位',code:'sjdw',value:''},
					{name:'责任部门',code:'trbm',value:''},
					{name:'项目进度情况',code:'xmjdms',value:''},
					{name:'指导单位',code:'zddw',value:''},
					{name:'指导人员',code:'zdry',value:''},
					{name:'指导时间',code:'zdsj',value:''},
					{name:'存在问题',code:'czwt',value:''},
					{name:'指导意见',code:'zdyj',value:''},
					{name:'整改要求',code:'zgyq',value:''},
					{name:'整改期限',code:'zgqx',value:''}
				],
				xcImageList:[],
				fkImageList:[],
				backTime:'',
				backContent:'',
				backStatus:'',
				sfzgwc:null,
				zgqxTxt:'',
				id:'',
			}
		},
		methods:{
      getPatrolDetail() {
        getPatrolDetail({id: this.id}).then(res=>{
          this.data = res
        }).catch(err => {
          console.log(err)
        })
      },
		}
	}
</script>

<style scoped>
	.cleft{
		width: 100px;
		font-family: 'PingFangSC-Regular';
		font-size: 14px;
		color: #999999;
		font-weight: 400;
	}
	.cright{
		flex:1;
		font-family: 'PingFangSC-Regular';
		font-size: 14px;
		color: #212121;
		text-align: right;
		font-weight: 400;
	}
</style>